package com.ndp.fb.walle.business.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ndp.fb.rdb.api.EcGaClientInfoRdbService;
import com.ndp.fb.rdb.api.EcGaCredentialRdbService;
import com.ndp.fb.rdb.api.UserRdbServices;
import com.ndp.fb.rdb.model.Pager;
import com.ndp.fb.rdb.model.ga.EcGaCredentialExt;
import com.ndp.fb.walle.business.GaAuthorizationCodeFlow;
import org.springframework.stereotype.Component;

/**
 * Created by infi.he on 2016/3/24.
 */
@Component
public class GaAuthorizationCodeFlowImpl implements GaAuthorizationCodeFlow {

    @Reference
    private EcGaCredentialRdbService ecGaCredentialRdbService;

    @Reference
    private EcGaClientInfoRdbService ecGaClientInfoRdbService;

    @Reference
    private UserRdbServices userRdbServices;

    public Pager<EcGaCredentialExt> listEcGaCredentialExt(Long orgId, Integer firstResult, Integer sizeNo) {
        return ecGaCredentialRdbService.listEcGaCredentialExt(orgId, firstResult, sizeNo);
    }

    @Override
    public void unauth(Long orgId, String aLong) {
        ecGaCredentialRdbService.unauth(orgId, aLong);
    }

}
